package com.dormitoryAdministratorSystem.service.maintain.impl;

import com.dormitoryAdministratorSystem.dao.maintain.impl.MaintainDaoImpl;
import com.dormitoryAdministratorSystem.entity.maintain.Maintain;
import com.dormitoryAdministratorSystem.service.maintain.IMaintainService;

import java.util.List;

public class MaintainSerImpl implements IMaintainService {
    private MaintainDaoImpl mdi = new MaintainDaoImpl();

    @Override
    public List<Maintain> getMaintainInfos(int rId) {
        return mdi.getMainByRoomId(rId);
    }

    @Override
    public int addMaintaininfo(Maintain m) {
        return mdi.insertMaintain(m);
    }

    @Override
    public int updateInfo(Maintain m) {
        return mdi.updateMaintain(m);
    }

    @Override
    public Maintain showMainInfo(int mId) {
        return mdi.getMaintainInfo(mId);
    }
}
